package com.tyf.dubbo.controller;

import com.tyf.common.utils.R;
import com.tyf.dubbo.model.Student;
import com.tyf.dubbo.service.UserServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


@RestController
@RequestMapping("client/tyf/user")
public class UserController {

    @Autowired
    private UserServiceImpl userService;

    @RequestMapping(value ="getList")
    public R getList() {
        List<Student> studentList = userService.getStudentList();
        return R.ok(studentList.toString());
    }

}
